package com.styles.codingstyle.mapper;

import com.styles.codingstyle.dataobject.UserEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author 陈建
 * @Package com.styles.codingstyle.mapper
 * @Description: usermapper
 * @date 2018/5/30 14:26
 */
//@CacheConfig(cacheNames = {"", ""})
public interface UserMapper extends JpaRepository<UserEntity, Long>, JpaSpecificationExecutor<UserEntity> {

    @Query("from UserEntity where username=?1")
    List<UserEntity> findByUsername(String username);
}
